import request from '@/utils/request'
// 获取所有的部门负责人
export function getEmployeesSimple() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

export function getEmployees(params) {
  return request({
    url: '/sys/user',
    method: 'get',
    params
  })
}

// 添加员工
export function addEmployees(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}

// 删除员工
export function delEmployees(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete',
    id
  })
}

export function importEmployees(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}

export function getJobDetail(id) {
  return request({
    url: `/employees/${id}/jobs`,
    method: 'get'

  })
}

export function assignRoles(data) {
  return request({
    url: `/sys/user/assignRoles`,
    method: 'put',
    data

  })
}

